package com.dbdata.move.model;

// Generated cafuc by Hibernate Tools 4

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * UserBaseInfoMainPoint generated by hbm2java
 */
@Entity
@Table(name = "user_base_info_main_point")
public class UserBaseInfoMainPoint implements java.io.Serializable {

	private Long id;
	private MainPoint mainPoint;
	private UserBaseInfo userBaseInfo;
	private TrainNotice trainNotice;
	private MainPointModule mainPointModule;
	private byte state;
	private int studyNum;
	private int baseTime;
	private int failNum;
	private int acTime;
	private int landingNum;
	private int ffsTime;
	private int ftdTime;
	private boolean printCertificate;
	private Date activeTime;
	private Date finishTime;
	private Set<StopFly> stopFlies = new HashSet<StopFly>(0);

	public UserBaseInfoMainPoint() {
	}

	public UserBaseInfoMainPoint(MainPoint mainPoint,
			UserBaseInfo userBaseInfo, byte state, int studyNum, int baseTime,
			int failNum, int acTime, int landingNum, int ffsTime, int ftdTime,
			boolean printCertificate) {
		this.mainPoint = mainPoint;
		this.userBaseInfo = userBaseInfo;
		this.state = state;
		this.studyNum = studyNum;
		this.baseTime = baseTime;
		this.failNum = failNum;
		this.acTime = acTime;
		this.landingNum = landingNum;
		this.ffsTime = ffsTime;
		this.ftdTime = ftdTime;
		this.printCertificate = printCertificate;
	}

	public UserBaseInfoMainPoint(MainPoint mainPoint,
			UserBaseInfo userBaseInfo, TrainNotice trainNotice,
			MainPointModule mainPointModule, byte state, int studyNum,
			int baseTime, int failNum, int acTime, int landingNum, int ffsTime,
			int ftdTime, boolean printCertificate, Date activeTime,
			Date finishTime, Set<StopFly> stopFlies) {
		this.mainPoint = mainPoint;
		this.userBaseInfo = userBaseInfo;
		this.trainNotice = trainNotice;
		this.mainPointModule = mainPointModule;
		this.state = state;
		this.studyNum = studyNum;
		this.baseTime = baseTime;
		this.failNum = failNum;
		this.acTime = acTime;
		this.landingNum = landingNum;
		this.ffsTime = ffsTime;
		this.ftdTime = ftdTime;
		this.printCertificate = printCertificate;
		this.activeTime = activeTime;
		this.finishTime = finishTime;
		this.stopFlies = stopFlies;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MAIN_POINT_ID", nullable = false)
	public MainPoint getMainPoint() {
		return this.mainPoint;
	}

	public void setMainPoint(MainPoint mainPoint) {
		this.mainPoint = mainPoint;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "USER_BASE_INFO_ID", nullable = false)
	public UserBaseInfo getUserBaseInfo() {
		return this.userBaseInfo;
	}

	public void setUserBaseInfo(UserBaseInfo userBaseInfo) {
		this.userBaseInfo = userBaseInfo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TRAIN_NOTICE_ID")
	public TrainNotice getTrainNotice() {
		return this.trainNotice;
	}

	public void setTrainNotice(TrainNotice trainNotice) {
		this.trainNotice = trainNotice;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MPM_ID")
	public MainPointModule getMainPointModule() {
		return this.mainPointModule;
	}

	public void setMainPointModule(MainPointModule mainPointModule) {
		this.mainPointModule = mainPointModule;
	}

	@Column(name = "STATE", nullable = false)
	public byte getState() {
		return this.state;
	}

	public void setState(byte state) {
		this.state = state;
	}

	@Column(name = "STUDY_NUM", nullable = false)
	public int getStudyNum() {
		return this.studyNum;
	}

	public void setStudyNum(int studyNum) {
		this.studyNum = studyNum;
	}

	@Column(name = "BASE_TIME", nullable = false)
	public int getBaseTime() {
		return this.baseTime;
	}

	public void setBaseTime(int baseTime) {
		this.baseTime = baseTime;
	}

	@Column(name = "FAIL_NUM", nullable = false)
	public int getFailNum() {
		return this.failNum;
	}

	public void setFailNum(int failNum) {
		this.failNum = failNum;
	}

	@Column(name = "AC_TIME", nullable = false)
	public int getAcTime() {
		return this.acTime;
	}

	public void setAcTime(int acTime) {
		this.acTime = acTime;
	}

	@Column(name = "LANDING_NUM", nullable = false)
	public int getLandingNum() {
		return this.landingNum;
	}

	public void setLandingNum(int landingNum) {
		this.landingNum = landingNum;
	}

	@Column(name = "FFS_TIME", nullable = false)
	public int getFfsTime() {
		return this.ffsTime;
	}

	public void setFfsTime(int ffsTime) {
		this.ffsTime = ffsTime;
	}

	@Column(name = "FTD_TIME", nullable = false)
	public int getFtdTime() {
		return this.ftdTime;
	}

	public void setFtdTime(int ftdTime) {
		this.ftdTime = ftdTime;
	}

	@Column(name = "PRINT_CERTIFICATE", nullable = false)
	public boolean isPrintCertificate() {
		return this.printCertificate;
	}

	public void setPrintCertificate(boolean printCertificate) {
		this.printCertificate = printCertificate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "ACTIVE_TIME", length = 19)
	public Date getActiveTime() {
		return this.activeTime;
	}

	public void setActiveTime(Date activeTime) {
		this.activeTime = activeTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FINISH_TIME", length = 19)
	public Date getFinishTime() {
		return this.finishTime;
	}

	public void setFinishTime(Date finishTime) {
		this.finishTime = finishTime;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "userBaseInfoMainPoint")
	public Set<StopFly> getStopFlies() {
		return this.stopFlies;
	}

	public void setStopFlies(Set<StopFly> stopFlies) {
		this.stopFlies = stopFlies;
	}

}
